<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            background: blue;
        }

        div:hover {
            transform: rotate(365deg);
            transition: all .5s;
        }

        /* 鼠标移上更改颜色 */
    </style>
</head>

<body>
    <div></div>
    <p>段落</p>
</body>

</html>